package com.gzk.oeno.business.critere;

public enum CritereType {
	FREE_TEXT	(0),
	BOOLEAN		(1),
	SCALE		(2);
	
	public static CritereType fromIndex(int index){
		for (CritereType type : CritereType.values()){
			if (type.getIndex().intValue() == index)
				return type;
		}
		return null;
	}
	
	
	private final Integer index;
	
	private CritereType(int index){
		this.index = Integer.valueOf(index);
	}
	
	public Integer getIndex(){
		return index;
	}
}
